﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<GlassStore.Models.TopCatalogue>>" %>

<div id="CatalogueMenu">

    <ul id="categories">
        <% foreach (var top in Model)
           {%>
        <p id="top"><%:top.Name %></P>
        <% foreach (var sub in top.SubCatalogues.ToList())
           {%>
        <li>
            <%: Html.ActionLink(sub.Name, "Browse", "Glass", new { cId = sub.SubCatalogueId }, null) %>
        </li>
        <% } %>
        <br />
        <% } %>
    </ul>
</div>
